<template>
  <div class="main-container">
    <el-form :model="query" inline label-width="80px">
      <el-form-item>
        <el-input v-model="query.orderNo" placeholder="根据订单号搜索" prefix-icon="Search" />
      </el-form-item>
      <el-form-item>
        <el-input v-model="query.mobile" placeholder="根据手机号码搜索" prefix-icon="Search" />
      </el-form-item>
      <el-form-item>
        <enum-select v-model="query.orderStatus" :enum-name="'OrderStatus'" :title="'请选择支付方式'" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="handleQuery()">查询</el-button>
        <el-button @click="resetQuery()">重置</el-button>
      </el-form-item>
    </el-form>
    <common-order :page="page" @handle-page="handlePage" />
  </div>
</template>
<script setup>
  import useTable from '@/utils/table.js'
  import { commonApi } from '@/api/common.js'
  import CommonOrder from '@/components/Common/Order/index.vue'
  import EnumSelect from '@/components/Enum/Select/index.vue'

  // 基础功能
  const { page, handlePage, query, handleQuery, resetQuery } = useTable({
    page: commonApi.orderPage
  })
</script>
<style lang="scss" scoped></style>
